package com.beasts.ant.page.service;

import com.beasts.ant.page.entity.APHomePage;
import com.beasts.ant.page.mapper.APMapper;
import com.beasts.ant.page.repository.APHomePageRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author cn_zkn
 * @data 2018/5/24 14:44
 * @ver v1.0
 */
@Service
@Transactional
public class APHomePageServiceImpl implements IAPHomePageService {

    @Autowired
    private APHomePageRepository apHomePageRepository;

    @Autowired
    private APMapper apMapper;

    @Override
    public List<APHomePage> findAll() {
        return apHomePageRepository.findAll();
    }

    @Override
    public List<APHomePage> queryByPageOrder(String order) {
        return apHomePageRepository.queryByPageOrder(order);
    }

    @Override

    public List<APHomePage> getHomePage() {
        return apMapper.getHomePage();
    }

    @Override
    public List<APHomePage> getHomePageInfo() {
        return apMapper.getHomePageInfo();
    }
}
